package com.bit.java;

import java.util.Arrays;

public class Test8 {

    public static String myToString(int[] arraty) {
        String m = "[";
        for(int i = 0; i < arraty.length; i++) {
            m += arraty[i];
            if(i != arraty.length - 1) {
                m += ", ";
            }
        }
        m += "]";
        return m;
    }


    public static void main(String[] args) {
        int[] array = {1, 2, 3, 4, 5, 6, 7};
        String ret = myToString(array);
        System.out.println(ret);
    }
}
